package com.technology.education.ui.teacher.order

import android.os.Bundle
import com.google.android.material.tabs.TabLayoutMediator
import com.technology.education.databinding.FragmentOrderTeacherBinding
import com.technology.education.ext.showLog
import me.hgj.jetpackmvvm.base.fragment.BaseVmDbFragment
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.view.init

class OrderFragment : BaseVmDbFragment<BaseViewModel, FragmentOrderTeacherBinding>() {
    private val titles = listOf("全部", "进行中", "已完成", "待评价")
    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.toolBar.tvTitle.text = "订单"
        mDatabind.toolBar.toolbar.navigationIcon = null
        mDatabind.viewPage.init(
            this,
            arrayListOf(
                OrderListFragment.newInstance(0),
                OrderListFragment.newInstance(1),
                OrderListFragment.newInstance(2),
                OrderListFragment.newInstance(3)
            )
        )
        TabLayoutMediator(mDatabind.tabLayout, mDatabind.viewPage) { tab, pos ->
            tab.text = titles[pos]
        }.attach()
    }

    override fun lazyLoadData() {

    }

    override fun createObserver() {
    }

    override fun showLoading(message: String) {
    }

    override fun dismissLoading() {
    }
}